import request from '@/utils/request'
// 获取组织列表
export const getDepartment = () => {
  return request.get('/company/department')
}
// 获取部门负责人
export const getManagerList = () => {
  return request.get('/sys/user/simple')
}
// 新增部门
export const addDepartment = (data) => {
  return request.post('/company/department', data)
}
// 获取部门详情
export const getCompanyDetail = (id) => {
  return request.get(`/company/department/${id}`)
}
// 更新部门
/** *
 * 更新部门
 * ***/
// export function updateCompanyDetail(data) {
//   return request({
//     method: 'put',
//     url: `/company/department/${data.id}`,
//     data
//   })
// }
export const updateCompanyDetail = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}
// 删除部门
export const deleteDepartment = (id) => {
  return request.delete(`/company/department/${id}`)
}
